var express = require('express');
var router = express.Router();
const {getAllforms2,updateform2,addform2} = require("../service/orderformService")
//获取所有订单
router.get('/', async function (req, res, next) {
  const reqData = req.query
    const data = await getAllforms2(reqData);
    res.send(data);
});
//修改/删除订单
router.post('/', async function (req, res, next) {
  const reqData = req.body
    const data = await updateform2(reqData);
    res.send(data);
});
//添加订单
router.put('/', async function (req, res, next) {
  const reqData = req.body
    const data = await addform2(reqData);
    res.send(data);
});
module.exports = router;